package com.xinghai.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xinghai.system.domain.XhVehicleOrderInfo;
import com.xinghai.system.domain.dto.*;
import com.xinghai.system.domain.vo.XhStaticsReportQueryVo;
import com.xinghai.system.domain.vo.XhVehicleInfoQueryVo;

import java.util.List;

/**
 * 用车订单Service接口
 * 
 * @author xinghai
 * @date 2024-07-23
 */

public interface IXhVehicleOrderInfoService extends IService<XhVehicleOrderInfo>
{
    /**
     * 查询用车订单
     * 
     * @param id 用车订单主键
     * @return 用车订单
     */
    public XhVehicleOrderInfo getInfo(Long id);

    /**
     * 查询用车订单列表
     * 
     * @param xhVehicleOrderInfo 用车订单
     * @return 用车订单集合
     */
    public List<XhVehicleOrderInfoDTO> list(XhVehicleOrderInfo xhVehicleOrderInfo);

    /**
     * 新增用车订单
     * 
     * @param xhVehicleOrderInfo 用车订单
     * @return 结果
     */
    public int insert(XhVehicleOrderInfo xhVehicleOrderInfo);

    /**
     * 批量新增用车订单
     *
     * @param xhVehicleOrderInfoList 用车订单信息集合
     * @return 结果
     */
    public int insertBatch(List<XhVehicleOrderInfo> xhVehicleOrderInfoList);

    /**
     * 修改用车订单
     * 
     * @param xhVehicleOrderInfo 用车订单
     * @return 结果
     */
    public int update(XhVehicleOrderInfo xhVehicleOrderInfo);

    /**
     * 批量删除用车订单
     * 
     * @param ids 需要删除的用车订单主键集合
     * @return 结果
     */
    public int deleteBatch(Long[] ids);

    /**
     * 删除用车订单信息
     * 
     * @param id 用车订单主键
     * @return 结果
     */
    public int delete(Long id);

    /**
     * 导入用车订单信息
     *
     * @param xhVehicleOrderInfoList 用车订单信息集合
     * @return 结果
     */
    public boolean importData(List<XhVehicleOrderInfo> xhVehicleOrderInfo);

    /**
     * 物流公司接单
     *
     * @param xhVehicleOrderInfo 用车订单信息集合
     * @return 结果
     */
    int acceptOrder(XhVehicleOrderInfo xhVehicleOrderInfo) throws Exception;

    /**
     * 物流公司拒绝接单
     *
     * @param xhVehicleOrderInfo 用车订单信息集合
     * @return 结果
     */
    int refuseOrder(XhVehicleOrderInfo xhVehicleOrderInfo) throws Exception;

    /**
     * 物流公司车辆信息变更
     *
     * @param xhVehicleOrderInfo 用车订单信息集合
     * @return 结果
     */
    int changeOrder(XhVehicleOrderInfo xhVehicleOrderInfo) throws Exception;

    /**
     * 根据vehicleId查询订单
     * @param vehicleId
     * @return
     */
    XhVehicleOrderInfo selectVehicleOrderInfoByVehicleId(Long vehicleId);

    /**
     * 物流公司获取待更换车辆信息
     *
     * @param xhVehicleOrderInfo 用车订单信息集合
     * @return 结果
     */
    XhVehicleWaitChangeDTO waitChangeInfo(XhVehicleOrderInfo xhVehicleOrderInfo) throws Exception;

    List<XhVehicleOrderInfo> selectBatchByVehicleIds(List<Long> vehicleIds);

    List<XhUseVehicleInfoDto> getListByStatus(XhVehicleInfoQueryVo xhVehicleInfoQueryVo, String status);

    void updateStatusByProcessInstanceId(String processInstanceId, String status);

    List<ProjectFeeDetailDTO> projectFeeDetailPage(XhStaticsReportQueryVo xhStaticsReportQueryVo);

    List<DeptFeeDetailDTO> deptFeeDetailPage(XhStaticsReportQueryVo xhStaticsReportQueryVo);

    List<XhVehicleOrderInfoDTO> expiresList(XhVehicleOrderInfo xhVehicleOrderInfo);

    List<TransferDetailDTO> transferDetailPage(XhStaticsReportQueryVo xhStaticsReportQueryVo);
}
